package com.kfm.jdbc.day0325;

import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;

public class TestTest {

    public static void main(String[] args) {

        //Test<Goods> test = new Test<>();
        try {
            //List<Goods> goods = test.executeQuery1("select * from goods", new Goods.GoodsRecover());
            //System.out.println(goods);
            //test.close();

            Test<Category> test02 = new Test<>();
            List<Category> categories = test02.executeQuery1("select * from category", new Category.CategoryRecover());
            System.out.println(categories);
            test02.close();
            //ResultSetMetaData metaData = resultSet.getMetaData();
            //int columnCount = metaData.getColumnCount();
            //while (resultSet.next()) {
            //    for (int i = 1; i <= columnCount; i ++) {
            //        System.out.print(metaData.getColumnName(i) + ":" + resultSet.getObject(i));
            //    }
            //    System.out.println();
            //}

            Test<Category> test = new Test<>();
            //test.se
        } catch (SQLException e) {
            throw new RuntimeException(e);
        } catch (ClassNotFoundException e) {
            throw new RuntimeException(e);
        }
    }
}
